<?php require_once 'header_new.php' ?>
<link rel="stylesheet" href="/static/wapapp/css/bindwechat.css"/>
<body ontouchstart style="-webkit-overflow-scrolling:touch;">
<div class="container" id="container" >
</div>
<script type="text/html" id="tpl_home">
<div class="page" >
<div class="bading">
		<img src="images/logo.png" alt="" />
		<p class="title">绑定微信</p>
		<p>输入账号和密码绑定微信</p>
		<span>一个微信只能绑定一个账号</span>
		<p>绑定后不可解绑</p>
		<input type="text" class="account" placeholder="账号"/>
		<input type="text" class="psw" placeholder="密码"/>
		<div class="bind_btn">绑定</div>
	</div>
	<div class="Success-bg">
		<div>绑定成功,微信对应功能已开启</div>
	</div>
</div>
<script>
$(function(){
	$(".bind_btn").click(function(){
		var account=$(".account").val();
		var psw=$(".psw").val();
		$.post('/bindwechat/bind',{account:account,psw:psw},function(jdata){
			if(jdata.status==1){
				$(".Success-bg").fadeIn();
                setTimeout(function () {
					WeixinJSBridge.invoke('closeWindow',{},function(res){
                    });
				}, 2000);
				
			}else{
				alert("绑定失败，账号或密码不正确");
			}
		},"json");
	});
})
</script>
</script>
<?php require_once 'footer_new.php' ?>
